package com.caigou.modules.famous.adpter

import android.widget.CheckBox
import android.widget.CompoundButton
import com.caigou.modules.famous.R
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder

/**
 * @author #Suyghur.
 * Created on 2021/12/08
 */
class PublishBallItemAdapter(dataset: MutableList<String>, private val listener: CompoundButton.OnCheckedChangeListener) :
    BaseQuickAdapter<String, BaseViewHolder>(R.layout.item_publish_ball_list, dataset) {

    override fun convert(holder: BaseViewHolder, item: String) {
        holder.getView<CheckBox>(R.id.item_publish_ball_cb).text = item
        holder.getView<CheckBox>(R.id.item_publish_ball_cb).setOnCheckedChangeListener(listener)
    }
}